import '@/App.scss'
import { Router } from 'react-router-dom'
import { renderRoutes, RouteConfig } from 'react-router-config'
import { customHistory } from '@/utils/history'
import routes from '@/routes'
function App() {
  return (
    <Router history={customHistory}>
      <div className='app'>
        {/* 设置routes的类型为RouteConfig[]，否则报错 */}
        {renderRoutes(routes as RouteConfig[])}
      </div>
    </Router>
  )
}

export default App
